<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes"/>


<xsl:template match="/idl">
<xsl:text>
// this is a generated Remote Object Stub
// PLEASE EDIT !!

</xsl:text>
package <xsl:value-of select="bean/@package"/>;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;                     

public class <xsl:value-of select="bean/@name"/>
	implements <xsl:value-of select="bean/@name"/>Interface {

	private Log log = LogFactory.getLog(<xsl:value-of select="bean/@name"/>.class);

<xsl:apply-templates/> 
}
</xsl:template>

<xsl:template match="/idl/bean/method">
	public <xsl:if test="@static">static </xsl:if><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>(<xsl:for-each select="arg">
<xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
  <xsl:if test="position() != last()">
     <xsl:text>, </xsl:text>
  </xsl:if>
 </xsl:for-each>)  {
		// nonsense method stub ..
		<xsl:if test="not(@static)">
		log.info("Invoking Method:\t" + "<xsl:value-of select="@name"/>");
		</xsl:if>	
		<xsl:if test="not(@oneway)">
		<xsl:value-of select="@type"/> retval = null;
		return retval;
		</xsl:if>	

	}
</xsl:template>



</xsl:stylesheet>
